package test;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class ConectionModel {
	public static boolean consolelog = true;
	private static ConectionModel instance = new ConectionModel();
	public static ConectionModel getInstance(){
		return instance;
	}
	public Connection getConection(){
		Connection conn = null;
		String url = "jdbc:oracle:thin:koreamanr/koreamanr@112.216.253.125:1521:xe";
		/*String user = "koreamanr";
		String password = "koreamanr";*/
		
		try{
			Class.forName("oracle.jdbc.driver.OracleDriver");
			conn = DriverManager.getConnection(url);
		}catch(ClassNotFoundException e){
			e.printStackTrace();
			if(consolelog){
				System.out.println("접속에러");
			}
		}catch(SQLException e){
			e.printStackTrace();
			if(consolelog){
				System.out.println("접속에러");
			}
		}
		return conn;
	}
}
